package com.vencent.spring.bean;

import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class Person {
	
	@Scheduled(fixedRate=5000)
	public void playAfterDinner(){
		System.out.println("吃饭在"+ new Date() +"之前");
	}
	
	@Scheduled(cron="0 07 20 ? * *")
	public void playBeforeDinner(){
		System.out.println("吃饭在"+ new Date() +"之后");
	}
	
}
